organizing array using split using JS